package controller;

import java.io.IOException;

import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import br.com.jf.annotations.ControllerJF;
import br.com.jf.annotations.HttpServletRequestJF;
import br.com.jf.annotations.HttpServletResponseJF;
import br.com.jf.annotations.InjectJF;
import br.com.jf.annotations.MethodJF;
import br.com.jf.annotations.RequestTypeJF;
import br.com.jf.annotations.ScopeTypeJF;
import br.com.jf.constants.RequestType;
import br.com.jf.constants.ScopeType;

@ControllerJF(urlPattern = "topico")
@ScopeTypeJF(scope=ScopeType.NONE)
public class TopicoController {

	@InjectJF
	private ServletContext context;
	
	@InjectJF
	private ServletConfig config;

	
	@MethodJF
	@RequestTypeJF(method=RequestType.GET,name="inicializarTopico")
	public String inicializarTopico(@HttpServletRequestJF HttpServletRequest request, @HttpServletResponseJF HttpServletResponse response) throws ServletException, IOException{
		
		
		String idTopico = request.getParameter("id");
		
		System.out.println("O ID EH: " + idTopico);
		
		return "paginas/topico.jsp";
	}
		
}
